package com.aspose.cells.a.d;

public class zez extends zdw {
   private boolean[] g = new boolean[128];
   private char h = 127;
   private char i = 0;
   private zdx j;
   private zfa k;

   public zez(zdh var1, String var2, int var3) throws Exception {
      super(var1, var2, var3, false);
      this.j = new zdx(var1, this);
   }

   public void a(String var1) {
      for(int var2 = 0; var2 < var1.length(); ++var2) {
         char var3 = var1.charAt(var2);
         if (var3 <= 127) {
            this.g[var3] = true;
            if (var3 < this.h) {
               this.h = var3;
            }

            if (var3 > this.i) {
               this.i = var3;
            }
         }
      }

   }

   public void a(zeg var1) throws Exception {
      this.b(var1);
      this.k.a(var1);
      this.j.a(var1);
   }

   private void b(zeg var1) throws Exception {
      var1.a(this);
      var1.g();
      var1.a("/Type", "/Font");
      var1.a("/Subtype", "/Type1");
      var1.a("/BaseFont", com.aspose.cells.b.a.zv.a("/{0}", this.d));
      var1.a("/FirstChar", this.h);
      var1.a("/LastChar", this.i);
      this.k = new zfa(this.e, this.s());
      var1.a("/Widths", this.k.n());
      var1.a("/FontDescriptor", this.j.n());
      var1.a("/Encoding", "/WinAnsiEncoding");
      var1.h();
      var1.b();
   }

   protected void b() {
      StringBuilder var1 = new StringBuilder(this.t());
      if ((this.b & 3) == 3) {
         var1.append(",BoldItalic");
      } else if ((this.b & 1) == 1) {
         var1.append(",Bold");
      } else if ((this.b & 2) == 2) {
         var1.append(",Italic");
      }

      this.d = com.aspose.cells.b.a.zr.a(var1);
   }

   public String s() {
      new StringBuilder();
      String var2 = "[";

      for(char var3 = this.h; var3 <= this.i; ++var3) {
         if (this.g[var3]) {
            zfu var4 = this.c.f().b(var3);
            var2 = var2 + this.a(var4.c());
         } else {
            var2 = var2 + 0;
         }

         if (var3 < this.i) {
            var2 = var2 + " ";
         }
      }

      var2 = var2 + "]";
      return var2;
   }

   private String t() {
      String var1 = this.c.d();
      if (var1 == null) {
         var1 = com.aspose.cells.b.a.zv.a(this.c.c(), " ", "#20");
      }

      return var1;
   }

   public boolean l() {
      return false;
   }

   public static boolean b(String var0) {
      for(int var1 = 0; var1 < var0.length(); ++var1) {
         if (var0.charAt(var1) > 127) {
            return false;
         }
      }

      return true;
   }
}
